home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Belgian Amiga Club - ADF Collection
/
BS1 part 05.zip
/
BS1 part 5
/
Install1.adf
/
installov
< prev
next >
Wrap
Text File
|
1992-08-11
|
16KB
|
680 lines
; $VER: OpalVision Install Version 1.0 (21-jul-92)
; Script to Install the OpalVision System Software.
; By Martin Boyd and Prashant Maharaj.
; Opal Technology Pty Ltd.
;
;=============================================================================
;Constants
(set IMAGES_JPEGSIZE 2078720)
(set IMAGES_IFFSIZE 29057563)
(set IMAGES_FASTSIZE 41353728)
(set CONVERT_MEMSIZE 2160000)
(set ImgDir1 "Art")
(set ImgDir2 "Brushes")
(set ImgDir3 "Rendered")
(set ImgDir4 "BackDrops")
(set ImgDir5 "Photos")
;=============================================================================
; Procedures
(Procedure Config_Options
(set osversion (/ (getversion) 65536))
(if (=(database "vblank") 50)
(SET VIDEOTYPE "PAL")
(SET VIDEOTYPE "NTSC")
)
)
(Procedure Get_Selections
(if (=(database "cpu") "68000")
( (SET @InstallOpts %011101)
(SET Accelerator 0)
)
( (SET @InstallOpts %011110)
(SET Accelerator 1)
)
)
(set Selection
(askoptions
(prompt "Please select which parts of OpalVision system you would like to install:")
(help " The OpalVision system software includes:\n\n"
"OpalPaint\n"
" A Paint and Image Processing program. The 680x0\n"
" version is optimised for the 68020/30/40\n"
" processors and also requires a 68881/2 coprocessor.\n\n"
"Sample Images\n"
" Example 24 Bit Images.\n\n"
"OpalHotKey\n"
" Integrates OpalVision and Amiga Graphics.\n\n"
"Opal Presents!\n"
" Presentation Software.\n\n"
"Wacom Driver\n"
" Driver for Wacom Graphics Tablets.\n"
)
(choices
"OpalPaint (68000)"
"OpalPaint (680x0 & 68881/2)"
"Sample Images"
"OpalHotKey"
"Opal Presents!"
"Wacom Tablet Driver (Workbench 2.x Required)"
(default @InstallOpts)
)
)
)
( while (= Selection 0)
((message "You did not select anything, so there is nothing to do.")
(Get_Selections)
)
)
( while (=(BITAND Selection %11) %11)
((message "You can only install one version of OpalPaint.")
(Get_Selections)
)
)
( while (AND (=(BITAND Selection %11) %10) (= Accelerator 0))
((message "You cannot install the 680x0 version of OpalPaint on a 68000 Amiga.")
(Get_Selections)
)
)
)
(Procedure Make_OpalAssigns
(makeassign "OpalPaint" opal-dest)
(makeassign "OpalSwap" opal-dest)
)
(Procedure Install_Libs
(run "RAM:lha -E -N e RAM:OpalVision.lha libs/#? ram:")
(copylib
(prompt "Installing Opal.Library")
(source "Ram:libs/Opal.Library")
(dest "Libs:")
(confirm)
(help "")
)
(copylib
(prompt "Installing OpalReq.Library")
(source "Ram:libs/OpalReq.Library")
(dest "Libs:")
(confirm)
(help "")
)
(delete "Ram:libs/Opal.library" "Ram:libs/OpalReq.library" "Ram:libs")
)
(Procedure Make_Dir
( set opal-dest
(askdir
(prompt "Please select directory to install OpalVision into.")
(Help @askdir-help)
(newpath)
(default (tackon @default-dest "OpalVision"))
)
)
( if (= (exists opal-dest) 0)
(makedir opal-dest (infos))
)
)
(Procedure Install_OpalPaint
(working "Installing OpalPaint")
(if (BITAND Selection 2)
( (run "RAM:lha -E -N e RAM:OpalVision.lha OpalPaint.020 OpalPaint:")
(rename "OpalPaint:OpalPaint.020" "OpalPaint:OpalPaint")
)
(run "RAM:lha -E -N e RAM:OpalVision.lha OpalPaint OpalPaint:")
)
(run ("RAM:lha -E -N e RAM:OpalVision.lha OpalPaint.info OpalPaint:"))
(run ("RAM:lha -E -N e RAM:OpalVision.lha #?.prefs OpalPaint:"))
(working "Installing Draw Modes")
(run ("RAM:lha -E -N e RAM:OpalVision.lha DrawModes/#? OpalPaint:"))
(working "Installing Artist Tools")
(run ("RAM:lha -E -N e RAM:OpalVision.lha ArtistTools/#? OpalPaint:"))
(working "Installing Paper Types")
(run ("RAM:lha -E -N e RAM:OpalVision.lha PaperTypes/#? OpalPaint:"))
(working "Installing Colour Lists")
(run ("RAM:lha -E -N e RAM:OpalVision.lha #?.clist OpalPaint:"))
(askdisk
(dest "Install2")
(prompt "Please Insert Install Disk 2")
(help @askdisk-help)
)
(working "Installing Palettes")
(run "RAM:lha -E -N e Install2:Palettes.lha Palettes/#? OpalPaint:")
( set swap-dest
(askdir
(prompt "Please select directory to be used to store\n"
"temporary files created by OpalPaint")
(Help
"This directory will be used to store the temporary\n"
"files used by OpalPaint for virtual memory.\n\n"
"Virtual memory allows you to edit images that\n"
"are would normally need more RAM than is installed\n"
"in your system, or store unused spare pages and\n"
"cutout brushes on your hard drive."
)
(newpath)
(default "OpalPaint:Swap")
)
)
( if (= (exists swap-dest) 0)
(makedir swap-dest)
)
)
(Procedure Install_OpalHK
(working "Installing OpalHotKey")
(run "RAM:lha -E -N e RAM:OpalVision.lha OpalHotKey OpalHotKey.info OpalPaint:")
(set RunOpalHK
(askbool
(prompt "Do you want to have OpalHotKey\n"
"run automatically on boot up?\n"
)
(help "OpalHotKey allows you to load and display IFF-24,\n"
"OV_FAST, JPEG JFIF, all IFF palette-mapped formats\n"
"up to 256 colours and standard Amiga HAM images.\n"
"These images can be used as a backdrop behind\n"
"Workbench and all other standard Amiga screens.\n\n"
"The program also allows you to toggle display\n"
"priorities, priority stencils and genlock controls\n"
"using simple HotKeys.\n"
"This program only occupies 24K of Fast RAM when\n"
"inactive."
)
(default 1)
)
)
)
(Procedure Install_OpalPresents
(working "Installing Opal Presents!")
(run "RAM:lha -E -N e RAM:OpalVision.lha OpalPresents! OpalPlayer OpalPresents!.info OpalPaint:")
)
(Procedure Install_Wacom
(if (< osversion 36)
(askbool
(prompt "The Wacom Device can only be used with\n"
"AmigaDos 2.0 or greater.\n"
"This section will not be installed.\n"
)
(help "")
)
( (run ("RAM:lha -E -N e RAM:OpalVision.lha devs/WacomII.device ram:"))
(copylib
(prompt "Installing Wacom Device Driver")
(source "Ram:devs/WacomII.device")
(dest "devs:")
(confirm)
(help "")
)
(run ("RAM:lha -E -N e RAM:OpalVision.lha Wacom/#? ram:"))
(copyfiles
(help "")
(source "Ram:Wacom")
(pattern "#?")
(dest "OpalPaint:OpalUtils")
)
(delete "RAM:WacomII.device" "RAM:wacom/WacomMouse"
"RAM:wacom/WacomMouse.info" "RAM:wacom")
(run ("RAM:lha -E -N e RAM:OpalVision.lha Prefs/#? sys:"))
(tooltype (dest "sys:prefs/Wacom.info") (noposition))
(set WacomMouse
( askbool
(prompt "Do you want to have the Wacom Tablet\n"
"emulate the mouse at all times?"
)
(help "If this option is enabled, the Wacom graphics tablet\n"
"will always be active and move the mouse pointer.\n"
"If this option is not selected, the tablet will\n"
"only be active while OpalPaint is running."
"The mouse will still be active although you may\n"
"experience strange results if you try to use it\n"
"simultaneously with the tablet.\n"
)
)
)
)
)
)
(Procedure Install_Images
(set @ImageFormat
(askchoice
(prompt "Choose which image format you wish\n"
"the example images to be."
)
(help
"JPEG\n"
" Use this format if you wish to preserve disk\n"
" space, this format will take longer to load.\n"
" Disk space required for example images: 2M Bytes.\n\n"
"IFF24\n"
" This is the standard Amiga file format and \n"
" the most commonly used.\n"
" Disk space required for example images: 28M Bytes.\n\n"
"OV_FAST\n"
" This format will create the largest files, however\n"
" this format can be loaded faster on a 68000 Amiga.\n"
" Do not use this format if you have an accelerator\n"
" Disk space required for example images: 40M Bytes.\n\n"
)
(choices "JPEG" "IFF24" "OV_FAST (See Help for recommendations)")
(default 0)
)
)
(set Images_Dest
(askdir
(prompt "Please select directory to install sample images")
(Help @askdir-help)
(newpath)
(default "OpalPaint:Images")
)
)
( if (= (exists Images_Dest) 0)
(makedir Images_Dest (infos))
)
(makeassign "Images24" Images_dest)
(if (< (getdiskspace Images_Dest) IMAGES_JPEGSIZE)
(askbool
(prompt "Not Enough disk space to install Images.")
(help "")
)
( (Copy_Images)
(Convert_Images)
)
)
)
(Procedure Copy_Images
(makedir "Images24:Brushes")
(makedir "Images24:Art")
(makedir "Images24:Rendered")
(makedir "Images24:BackDrops")
(makedir "Images24:Photos")
(askdisk
(dest "Install2")
(prompt "Please Insert Images Disk 1")
(help @askdisk-help)
)
(copyfiles
(help "")
(source "Install2:")
(pattern "#?.info")
(dest "Images24:")
)
(set CurrDisk "Install2")
(Copy_AllDirs)
(askdisk
(dest "Install3")
(prompt "Please Insert Images Disk 2")
(help @askdisk-help)
)
(set CurrDisk "Install3")
(Copy_AllDirs)
(askdisk
(dest "Install4")
(prompt "Please Insert Images Disk 3")
(help @askdisk-help)
)
(set CurrDisk "Install4")
(Copy_AllDirs)
(askdisk
(dest "Install5")
(prompt "Please Insert Images Disk 4")
(help @askdisk-help)
)
(set CurrDisk "Install5")
(Copy_AllDirs)
)
(Procedure Copy_AllDirs
(set CurrDir ImgDir1)
(set Image_Dest ImgDir1)
(Copy_Dir)
(set CurrDir ImgDir2)
(set Image_Dest ImgDir2)
(Copy_Dir)
(set CurrDir ImgDir3)
(set Image_Dest ImgDir3)
(Copy_Dir)
(if (= VIDEOTYPE "PAL")
(set CurrDir "Rendered_PAL")
(set CurrDir "Rendered_NTSC")
)
(Copy_Dir)
(set CurrDir ImgDir4)
(set Image_Dest ImgDir4)
(Copy_Dir)
(if (= VIDEOTYPE "PAL")
(set CurrDir "BackDrops_PAL")
(set CurrDir "BackDrops_NTSC")
)
(Copy_Dir)
(set CurrDir ImgDir5)
(set Image_Dest ImgDir5)
(Copy_Dir)
(if (= VIDEOTYPE "PAL")
(set CurrDir "Photos_PAL")
(set CurrDir "Photos_NTSC")
)
(Copy_Dir)
)
(Procedure Copy_Dir
(copyfiles
(prompt "Copying Image Files")
(help "")
(source (cat ("%s:%s" CurrDisk CurrDir)))
(pattern "#?")
(dest (tackon Images_Dest Image_Dest))
)
)
(Procedure Convert_Images
(set ConvertEm 0)
(if (= @ImageFormat 1)
( (set FormatString "IFF24")
(set FormatName "IFF")
(set DiskSize IMAGES_IFFSIZE)
(set ConvertEm 1)
)
)
(if (= @ImageFormat 2)
( (set FormatString "FAST")
(set FormatName "OV_FAST")
(set DiskSize IMAGES_FASTSIZE)
(set ConvertEm 1)
)
)
(if (AND (= ConvertEm 1) (< (getdiskspace Images_Dest) DiskSize))
( (askbool
(prompt "Not Enough disk space to convert sample Images.\n"
"They will remain in JPEG format.\n"
)
(help "")
)
(set ConvertEm 0)
)
)
(delete "RAM:lha" "RAM:OpalVision.lha")
(set AvailMem (database "total-mem"))
(set AvailMem (+ AvailMem 0))
(if (AND (= ConvertEm 1) (< AvailMem CONVERT_MEMSIZE))
( (askbool
(prompt "Not enough memory to convert images.\n"
"They will remain in JPEG format.\n"
)
(help "")
)
(set ConvertEm 0)
)
)
(if (= ConvertEm 1)
( (set ImageNumber 1)
(set TotalImages 0)
(Set ActivePath (tackon Images_Dest ImgDir1))
(foreach ActivePath "~(#?.info)"
(set TotalImages (+ TotalImages 1))
)
(Set ActivePath (tackon Images_Dest ImgDir3))
(foreach ActivePath "~(#?.info)"
(set TotalImages (+ TotalImages 1))
)
(Set ActivePath (tackon Images_Dest ImgDir4))
(foreach ActivePath "~(#?.info)"
(set TotalImages (+ TotalImages 1))
)
(Set ActivePath (tackon Images_Dest ImgDir5))
(foreach ActivePath "~(#?.info)"
(set TotalImages (+ TotalImages 1))
)
(Set ActivePath (tackon Images_Dest ImgDir1))
(Convert_Dir)
(Set ActivePath (tackon Images_Dest ImgDir3))
(Convert_Dir)
(Set ActivePath (tackon Images_Dest ImgDir4))
(Convert_Dir)
(Set ActivePath (tackon Images_Dest ImgDir5))
(Convert_Dir)
)
)
)
(Procedure Convert_Dir
(foreach ActivePath "~(#?.info)"
( (working ("Converting Images to %s, this will take some time.\n %ld of %ld" FormatName ImageNumber TotalImages))
(set ImageName (tackon ActivePath @each-name))
(run ("OpalPaint:OpalUtils/Convert24 %s to %s as %s" ImageName ImageName FormatString))
(set ImageNumber (+ ImageNumber 1))
)
)
)
(Procedure Install_Utils
(working ("Installing OpalVision Utilities"))
(makedir "OpalPaint:OpalUtils" (infos))
(run ("RAM:lha -E -N e RAM:OpalVision.lha OpalUtils/#? OpalPaint:"))
)
(Procedure Make_ThumbNails
(set MakeEm
(askbool
(prompt "Do you want thumbnails created for\n"
"existing IFF files on your system?\n"
)
(help "This program scans nominated drawers and sub-\n"
"drawers on your hard drive for images in IFF-24,\n"
"OV-FAST, and all IFF palette-mapped formats\n"
"up to 256 colours and standard Amiga HAM. Each\n"
"time it finds an image it inserts a Thumbnail\n"
"into the image file. These tiny 24-bit thumbnails\n"
"add only 4K to the size of each file but allow all\n"
"programs that use the common OpalVision File Menu\n"
"to display a minature but very clear\n"
"representation of each image before loading it."
)
(default 0)
)
)
(if (= MakeEm 1)
(run ("OpalPaint:OpalUtils/MakeThumbNails")
(prompt ("Creating Thumbnails.."))
)
)
)
(Procedure Modify_StartUp
(set NeedMod 0)
(set OPAssign ("Assign OpalPaint: %s\n" opal-dest))
(set OVPath "Path OpalPaint:OpalUtils add\n")
(set NeedMod 1)
(if (= RunOpalHK 1)
( (set HKCommand "OpalPaint:OpalHotKey reset\n")
(set NeedMod 1)
)
)
(if (= WacomMouse 1)
( (set WacomCommand "OpalPaint:OpalUtils/WacomMouse on\n")
(set NeedMod 1)
)
)
(if (BITAND Selection %11)
( (set OSAssign ("Assign OpalSwap: %s\n" swap-dest))
(set NeedMod 1)
)
)
(if (BITAND Selection 4)
( (set ImageAssign ("Assign Images24: %s\n" Images_dest))
(set CutOutAssign ("Assign CutOuts24: %s\n" (tackon Images_Dest "Brushes")))
(makeassign "Images24:" Images_dest)
(makeassign "CutOuts24:" (tackon Images_Dest "Brushes"))
(set NeedMod 1)
)
)
(if (= NeedMod 1)
(startup "OpalVision"
(prompt
"Some instructions need to be added to the \"S:user-startup\" "
"so that your system will be properly configured to use "
"the OpalVision Software.")
(help "Do this or OpalPaint and other software won't work!!")
(command
OPAssign
OSAssign
ImageAssign
CutOutAssign
HKCommand
WacomCommand
OVPath
)
)
)
)
(Procedure Adjust_OV
(set DoAdjust
(askbool
(prompt "If this is the first time you have installed\n"
"your OpalVision card, or you are installing\n"
"it into a new system, you may need to adjust\n"
"the OpalVision hardware.\n\n"
"Do you wish to do this now?\n"
)
(help "This adjustment is required to synchronise\n"
"the OpalVision card with your Amiga. This\n"
"procedure is highly recommended if you are\n"
"installing OpalVision for the first time.\n"
"After installation the adjustment program\n"
"can be found in the OpalUtils drawer.\n"
)
(default 1)
)
)
(if (= DoAdjust 1)
(run ("OpalPaint:OpalUtils/Alignment_Adjust"))
)
)
(Procedure Read_Me
(set ReadIt
(askbool
(prompt "Do you wish to read the 'ReadMe' file which\n"
"contains last minute notes and updates since\n"
"the last printing of the manuals?\n"
)
(help "Yeah, Go on..")
(default 1)
)
)
(if (= ReadIt 1)
( (askdisk
(dest "Install1")
(prompt "Please Insert Install Disk 1")
(help @askdisk-help)
)
(run ("run Sys:Utilities/More Install1:OVReadMe"))
)
)
)
;=============================================================================
; OK, lets do it..
(set RunOpalHK 0)
(set WacomMouse 0)
(Config_Options)
(Get_Selections)
(Make_Dir)
(askdisk
(dest "Install1")
(prompt "Please Insert Install Disk 1")
(help @askdisk-help)
)
(copyfiles
(prompt "")
(help "")
(source "Install1:c/Lha")
(dest "RAM:")
)
(copyfiles
(prompt "")
(help "")
(source "Install1:OpalVision.lha")
(dest "RAM:")
)
(Make_OpalAssigns)
(Install_Libs)
(Install_Utils)
(if (BITAND Selection 8) (Install_OpalHK))
(if (BITAND Selection 16) (Install_OpalPresents))
(if (BITAND Selection 32) (Install_Wacom))
(if (BITAND Selection 1) (Install_OpalPaint))
(if (BITAND Selection 2) (Install_OpalPaint))
(if (BITAND Selection 4) (Install_Images))
(Make_ThumbNails)
(delete "RAM:Lha" "RAM:OpalVision.lha")
(Adjust_OV)
(Modify_Startup)
(Read_Me)
(set @default-dest opal-dest)
(exit)